import proot/load box/{logger,condit,ui}

shift

Load-Proot-Config false "$1"

Warn "Delete: Link2symlink records and data in tmp"
Get-Ask-Ui "确认清除缓存数据 ?" no
Choose=$?
case $Choose in
100)
  RM_L2S_DIR=$PL_EXTRA_DIR/meta/$RELEASE_NAME
  RM_TMP_DIR=$PL_EXTRA_DIR/tmp/$RELEASE_NAME
  if Has-Dir $RM_L2S_DIR;then
    Msg "正删除 link2symlink 记录..."
    rm -rf $RM_L2S_DIR/.l2s.*
  fi
  if Has-Dir $RM_TMP_DIR;then
    Msg "正删除临时数据..."
    rm -rf $RM_TMP_DIR/*
  fi
  ;;
10[12])
  Msg "取消"
  exit
esac